<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="description" content="%description%" />
    <meta name="keywords" content="" />
    <meta name="author" content="ComponentOne" />
    <link href="../../themes/rocket/jquery-wijmo.css" rel="stylesheet" type="text/css" />
    <script src="../../external/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="../../external/jquery-ui-1.9.1.custom.min.js" type="text/javascript"></script>
	<script src="../../external/raphael-min.js" type="text/javascript"></script>
    <script src="../../wijmo/jquery.wijmo.raphael.js" type="text/javascript"></script>
    <script src="../../wijmo/jquery.wijmo.wijgauge.js" type="text/javascript"></script>
    <script src="../../wijmo/jquery.wijmo.wijlineargauge.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var labels = ["Low", "Stable", "Moderate", "High", "Danger Zone"];
            function formatLabels(str) {
                return labels[str];
            }

            $("#gauge").wijlineargauge({
                width: 400,
                height: 120,
                value: 4,
                max: 4,
                min: 0,
                labels: {
                    format: formatLabels,
                    style: {
                        fill: "#1E395B",
                        "font-size": 12,
                        "font-weight": 800
                    }
                },
                tickMajor: {
                    position: "inside",
                    offset: -11,
                    interval: 1,
                    factor: 12,
                    style: {
                        fill: "#1E395B",
                        stroke: "none",
                        width: 2
                    }
                },
                tickMinor: {
                    position: "inside",
                    offset: -11,
                    visible: true,
                    interval: 0.25,
                    factor: 10,
                    style: {
                        fill: "#1E395B",
                        stroke: "none",
                        width: 1
                    }
                },
                pointer: {
                    shape: "rect",
                    length: 0.6,
                    style: {
                        fill: "#1E395B",
                        stroke: "#7BA0CC",
                        "stroke-width": 1,
                        opacity: 1
                    }
                },
                face: {
                    style: {
                        fill: "270-#FFFFFF-#D9E3F0",
                        stroke: "#7BA0CC",
                        "stroke-width": 2
                    }
                },
                ranges: [{
                    startValue: 20,
                    endValue: 80,
                    startDistance: 0.85, //A ratio value determine the location of the range at start value.
                    endDistance: 0.85, //A ratio value determine the location of the range at end value.
                    startWidth: 0.5,
                    endWidth: 0.5,
                    style: {
                        fill: "90-#3DA1D8-#3A6CAC",
                        opacity: "1",
                        stroke: "none"
                    }
                }]
            });

        });
    
    </script>
</head>
<body class="demo-single">
    <div class="container">
        <div class="header">
            <h2>
                Custom Labels</h2>
        </div>
        <div class="main demo">
            <!-- Begin demo markup -->
            <div id="gauge" class="ui-corner-all">

            </div>
            <!-- End demo markup -->
            <div class="demo-options">
                <!-- Begin options markup -->
                <!-- End options markup -->
            </div>
        </div>
        <div class="footer demo-description">
            <p>This sample demonstrates how to use the wijlineargauge widget to create an linear gauge with custom labels.</p>
        </div>
    </div>
</body>
</html>
